package com.cosyhut.blocks.jode;

public class ODEWorld {
    private long _id;
    private SWIGTYPE_p_dxWorld _world;
    
    public ODEWorld() {
        this._world = jode.dWorldCreate();
        this._id = SWIGTYPE_p_dxWorld.getCPtr(this._world);
        jode.dWorldSetGravity(this._world, 0f, -9.81f, 0f);
        jode.dWorldSetQuickStepNumIterations(this._world, 10);
        
        jode.dWorldSetAutoDisableFlag(this._world, 1);
        jode.dWorldSetContactSurfaceLayer (this._world, 0.001f);


        // Setup some surface parameters: maximum friction
        //Odejava.setSurfaceMu(Float.MAX_VALUE);
    }

    public void step(float step) {
        jode.dWorldQuickStep(this._world, step);
    }

    //--------------------------------------------------------------------------
    public SWIGTYPE_p_dxWorld getWorld() {
        return this._world;
    }
    public long getID() {
        return this._id;
    }

}
